//
//  MineCell.swift
//  KaMengApplication
//
//  Created by DUONIU_MAC on 2018/8/21.
//  Copyright © 2018年 DUONIU_MAC. All rights reserved.
//

import UIKit

class MineCell: UITableViewCell {

    var iconImageView = UIImageView()
    var titleLabel = UILabel()
    
    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        self.contentView.backgroundColor = UIColor.white
        
        self.contentView.addSubview(iconImageView)
        
        titleLabel.textColor = UIColor.fontGray()
        titleLabel.font = UIFont.systemFont(ofSize: RATIO(maxNum: 15))
        self.contentView.addSubview(titleLabel)
        
        iconImageView.snp.makeConstraints { (make) in
            make.centerY.equalToSuperview()
            make.left.equalToSuperview().offset(RATIO(maxNum: 20))
            make.width.height.equalTo(RATIO_H(maxNum: 20))
        }
        
        titleLabel.snp.makeConstraints { (make) in
            make.left.equalTo(iconImageView.snp.right).offset(RATIO(maxNum: 10))
            make.width.greaterThanOrEqualTo(10)
            make.height.equalTo(RATIO_H(maxNum: 20))
            make.centerY.equalTo(iconImageView)
        }
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
